put "I predict that the total will be..." && mN & "." into field "Prediction"
put mT into field a
put mU into field y
get mT+mU
put mN-it into toGo
put random of 10 into z1
put random of 10 into z2
put random of 10 into z3
put random of 10 into z4
put random of 10 into z5
get z1+z2+z3+z4+z5
if it > toGo then
get it-toGo
put z5-it into z5
end if
get z1+z2+z3+z4+z5
put toGo-it into z6
get random of mT
put it into y1
put mT-y1 into y2
get random of mU
put it into y3
put mU-y3 into y4
put "xmh5639th7" into mH
put y1 + z1 into field b
put y1+z2 into field c
put y1+z3 into field d
put y1+y3 into field e
put z4+y2 into field f
put z4+z1 into field g
put z4+z2 into field h
put z4+z3 into field i
put z4+y3 into field j
put z5+y2 into field k
put z5+z1 into field l
put z5+z2 into field m
put z5+z3 into field n
put z5+y3 into field o
put z6+y2 into field p
put z6+z1 into field q
put z6+z2 into field r
put z6+z3 into field s
put z6+y3 into field t
put y4+y2 into field u
put y4+z1 into field v
put y4+z2 into field w
put y4+z3 into field x
put y4+y3 into field y
unlock screen with visual effect dissolve
set cursor to hand
else wait 0
end openCard
on closeCard
lock Screen
hide card field "Instructions"
hide card field "SW Info"
put "" into field "prediction"
put "" into field a
put "" into field b
put "" into field c
put "" into field d
put "" into field e
put "" into field f
put "" into field g
put "" into field h
put "" into field i
put "" into field j
put "" into field k
put "" into field l
put "" into field m
put "" into field n
put "" into field o
put "" into field p
put "" into field q
put "" into field r
put "" into field s
put "" into field t
put "" into field u
put "" into field v
put "" into field w
put "" into field x
put "" into field y
unlock Screen
end closeCard
-- part 30 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=287 top=260 right=282 bottom=373
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Square
----- HyperTalk script -----
on mouseUp
openCard
end mouseUp
-- part 32 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=417 top=256 right=286 bottom=454
-- title width / last selected line: 0
-- icon id / first selected line: 1011 / 1011
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Go Home
----- HyperTalk script -----
on mouseUp
lock screen
go home
unlock screen with visual effect dissolve
end mouseUp
-- part 73 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=374 top=162 right=210 bottom=453
-- title width / last selected line: 0
-- icon id / first selected line: 20965 / 20965
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Shareware Info
----- HyperTalk script -----
on mouseUp
lock screen
show card field "SW Info"
unlock screen with visual dissolve
end mouseUp
-- part 75 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=378 top=256 right=288 bottom=414
-- title width / last selected line: 0
-- icon id / first selected line: 21060 / 21060
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
lock screen
show card field "Instructions"
unlock screen with visual iris open slow
end mouseUp
-- part 76 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=124 top=74 right=284 bottom=392
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Instructions
----- HyperTalk script -----
on mouseUp
lock screen
hide me
unlock screen with visual iris close slow
end mouseUp
-- part 74 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=129 top=144 right=213 bottom=388
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: SW Info
----- HyperTalk script -----
on mouseUp
lock screen
hide me
unlock screen with visual barn door close slow
end mouseUp
-- part 77 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=24 top=132 right=144 bottom=36
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseUp
global mH,se,oC
put 1 into oC
visual dissolve very fast to inverse
visual dissolve very fast
go this card
put "" into oC
ask "To go on, you must know the password:"
if it is mH then
put "OK" into se
go to card 2
else
if it is "" then wait 0
else
show card field "Nope"
end if
end if
end mouseUp
-- part 78 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=148 top=100 right=201 bottom=374
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Nope
----- HyperTalk script -----
on mouseUp
lock screen
hide me
unlock screen with visual dissolve
end mouseUp
-- part contents for card part 28
----- text -----
24
-- part contents for card part 34
----- text -----
24
-- part contents for card part 35
----- text -----
a
-- part contents for card part 36
----- text -----
b
-- part contents for card part 37
----- text -----
c
-- part contents for card part 38
----- text -----
d
-- part contents for card part 39
----- text -----
e
-- part contents for card part 50
----- text -----
f
-- part contents for card part 51
----- text -----
g
-- part contents for card part 52
----- text -----
h
-- part contents for card part 53
----- text -----
i
-- part contents for card part 40
----- text -----
j
-- part contents for card part 49
----- text -----
k
-- part contents for card part 58
----- text -----
l
-- part contents for card part 59
----- text -----
m
-- part contents for card part 54
----- text -----
n
-- part contents for card part 41
----- text -----
o
-- part contents for card part 48
----- text -----
p
-- part contents for card part 57
----- text -----
q
-- part contents for card part 56
----- text -----
r
-- part contents for card part 55
----- text -----
s
-- part contents for card part 42
----- text -----
t
-- part contents for card part 47
----- text -----
u
-- part contents for card part 46
----- text -----
v
-- part contents for card part 45
----- text -----
w
-- part contents for card part 44
----- text -----
x
-- part contents for card part 43
----- text -----
y
-- part contents for card part 31
----- text -----
I predict that the total will be... 67.
-- part contents for card part 65
----- text -----
56
-- part contents for card part 66
----- text -----
78
-- part contents for card part 67
----- text -----
90
-- part contents for card part 74
----- text -----
If you like this stack, please send $5 to:
Dan Wineman
608 Crum Creek Road
Wallingford, PA 19086
-- part contents for card part 76
----- text -----
The Magic Square
by Dan Wineman
Ver. 1.0
Instructions
(Click anywhere in this box to close)
The Magic Square is a magic trick which works as follows:
A 5 by 5 grid of squares appears; a number is in each square. The computer makes its prediction, as to what the total of the numbers you choose will be, in a box to the right.
When you click a number, it and all of the numbers in its row and column disappear. The number you click goes into one of five boxes to the right of the grid, and the total thus far appears in the “Total:” box. You proceed, choosing four more numbers, each of which goes in a box, and the total increases each time. When you finish, you look at the total, and... well, I’ll let you find that part out for yourself.
After you have finished checking the computer’s arithmetic, you may try another grid by clicking “New Square.”
(Oh—and, incidentally, if you feel you must know how this is done, there is a secret spot somewhere on the picture frame, which, when clicked, will give you a surprise.)
-- part contents for card part 78
----- text -----
Sorry, wrong password.
Send in the shareware fee (if you haven't already) plus an extra $2.50 and I’ll mail you the password. With it, you’ll learn the secret to the Magic Square.